package Java8实战.Lambda实战._1_Lambda方法引用_传递代码;

import Java8实战.Lambda实战.Apple;

import java.util.Comparator;

public class AppleComparator implements Comparator<Apple> {

    @Override
    public int compare(Apple o1, Apple o2) {

        return o1.getWeight().compareTo(o2.getWeight());
    }


}
